<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./1.CSS">
    <style>

        ul{
            width: 800px;
            border: 3px red solid;
            display: flex;
        }
        li{
            /* 
            flex-basis可以指定弹性元素的基础长度
             默认情况下为auto，长度为弹性元素中已指定的长度
              1.当主轴横向排列时，指定长度为宽度
              2.当主轴纵向排列时，指定长度为高度
             */
            flex-basis: 100px;
            /*
            flex可以同时指定增长系数，缩减系数和基础长度

            flex: flex-grow flex-shrink flex-basis  
             */
            flex:1 1 auto;
            font-size: 20px;
            text-align: center;
            line-height: 150px;
        }
        li:nth-child(1){
            /* order可以指定弹性元素的排列顺序 */
            order: 3;
            width: 150px;
            height: 150px;
            background-color: skyblue;
        }
        li:nth-child(2){
            order: 2;
            width: 150px;
            height: 150px;
            background-color: pink;

        }
        li:nth-child(3){
            order: 1;
            width: 150px;
            height: 150px;
            background-color: orange;
        }
    </style>
</head>
<body>
    <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
    </ul>
</body>
</html>